import 'package:flutter/material.dart';

class HomePage extends StatefulWidget {
  @override
  HomePageState createState() => new HomePageState();
}

// /// 用于显示的Widget
// class CounterDisplay extends StatelessWidget {
//   CounterDisplay({this.count});
//
//   final int count;
//
//   @override
//   Widget build(BuildContext context) {
//     return Text('Count: $count');
//   }
// }
// /// 用于操作的Widget
// class CounterIncrementor extends StatelessWidget {
//   CounterIncrementor({this.onPressed});
//
//   final VoidCallback onPressed;
//
//   @override
//   Widget build(BuildContext context) {
//     return ElevatedButton(
//       onPressed: onPressed,
//       child: Text('Increment'),
//     );
//   }
// }

class HomePageState extends State<HomePage> {

  int _counter = 0;

  void _increment() {
    setState(() {
      ++_counter;
    });
  }

  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        title: new Text('首页'),
      ),
      body: Column(children: <Widget>[
        // CounterIncrementor(onPressed: _increment),
        // CounterDisplay(count: _counter),
      ]),

    );
  }


}